<%@ page import="com.afishing.entity.User" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>个人中心</title>
</head>
<body>
<%
    User user = (User) session.getAttribute("user");
    if (user == null) {
        response.sendRedirect("login.jsp");
        return;
    }
%>
<h1>个人中心</h1>
<form action="updateProfile" method="post">
    <label for="username">用户名:</label>
    <input type="text" id="username" name="username" value="<%= user.getUsername() %>"><br><br>
    <label for="password">密码:</label>
    <input type="password" id="password" name="password" value="<%= user.getPassword() %>"><br><br>
    <input type="submit" value="更新" onclick="alertMsg()">
</form>
</body>
<script>
    function alertMsg() {
        alert("更新成功");
    }
</script>
</html>